package P1009;

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int len = sc.nextInt();
        long[] arr = new long[len];
        long sum = arr[0] = 1;
        for (int i = 1; i<len;++i){
            arr[i] = arr[i-1]* (i+1);
            sum += arr[i];
        }
        System.out.println(sum);


    }
}
